#ifndef _H_INTERPOLATION_PROCESSOR_H_
#define _H_INTERPOLATION_PROCESSOR_H_

/**
	Author : hyt
	History: 09/10/04 新增KeyFrameObject , follows Design Document
	         09/10/05 修改getIPValue , 不需考慮varType
			 09/11/10 Refactoring
			 09/11/18 Refactoring
			 09/12/22 Refactoring
**/
#include "InterpolationCenter.h"

class InterpolationProcessor{
public:
	InterpolationProcessor();
	~InterpolationProcessor();

	template < typename T >
	T excution( const T & pre, const T & current ) {//這邊改用template , 算式都相同 , 沒必要轉型後再作算式
		int speed = InterpolationCenter::getInstance()->getSpeed();
		int frame = InterpolationCenter::getInstance()->getFrames();
		return (current-pre)*speed/frame;
	}
};

#endif
